Repository navigation
Fix FCR macro collision with Renesas device headers (v1.4.1) - #40
Merged
Merged
Conversation
The dead #define FCR (rs->fcr) in src/int.h expanded the FCR hardware register name in the RA4M1 device header (R7FA4M1AB.h) and broke compilation on the Arduino UNO R4 WiFi (and other Renesas targets). The macro was never used (the struct field is accessed directly), so it was removed. Bump version to 1.4.1 and document in the changelog.
A WSPR beacon for the Arduino Uno R4 WiFi that transmits a packet every 10 minutes on 30 m using the ESP32-S3 module for NTP time sync. The sketch is sanitized (generic callsign/grid, placeholder credentials via arduino_secrets.h.example) and compiles without credentials.
The connectWiFi() status line printed 'Signal strength: ', which could be confused with the WSPR message power level. It now prints 'WiFi signal strength: ' to distinguish the two.
Each transmit now picks a random frequency inside the 30 m WSPR Tx window (10.1401-10.1403 MHz, 200 Hz wide), per the WSPR spec's 'choose a transmission frequency somewhere in the 200 Hz-wide standard WSPR bands'. Uses the Uno R4 WiFi's hardware TRNG via random() (do NOT seed it with randomSeed(), which would disable the TRNG).
WSPR transmissions start at hh:XX:01 (1 second after the start of each even UTC minute), not hh:XX:02. Update both the transmit instant and the comments.
… ESP8266, Renesas Adds a hardware-independent smoke sketch (tests/build-smoke) that exercises every encode path, and a build-matrix workflow that compiles it against the repo library (not an installed copy) for each core. The verbose-log guard fails the job if the repo library is not what was compiled, catching arduino-cli's silent fallback to an installed copy.
The arduino-lint library-spec rule (LD003) requires sketches to live in examples/ or extras/, so the committed tests/build-smoke sketch failed lint. The workflow now generates the sketch via a heredoc at build time (untracked), keeping the library spec valid while still compiling the repo library against AVR, ATSAMD, ESP32, ESP8266 and Renesas.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a real compile failure on Renesas targets (Arduino UNO R4 WiFi).
The dead
#define FCR (rs->fcr)insrc/int.hexpanded theFCRhardware register name in the RA4M1 device header (R7FA4M1AB.h), causing a syntax error (expected ')' before '->' token) inJTEncode.cpp,encode_rs_int.cpp, andinit_rs_int.cpp.JTEncode.hincludesint.hbeforeArduino.h, so the macro was in force when the device header was parsed. The macro was never used (thefcrstruct field is accessed directly), so it was removed.Also included:
WSPR_Beacon_UnoR4WiFiexample: a WSPR beacon that transmits every 10 minutes on 30 m using the ESP32-S3 module for NTP time sync. Generic callsign/grid, placeholder credentials viaarduino_secrets.h.example,.gitignoreforarduino_secrets.hrandom(), not seeded)hh:XX:01), per the WSPR specWiFi signal strength:)Verification
arduino_secrets.hpresent — the__has_includefallback path)Not verified